#!/bin/bash

# Description: 打印彩色输出
# File: echo_with_color.sh |Time: 2022-05-25 09:46

function line()
{
    echo ""
    echo "---------------------------------------"
    echo ""
}

echo -e "\e[1;0m reset text color\e[0m"
echo -e "\e[1;30m 30 -- black text \e[0m"
echo -e "\e[1;31m 31 -- red text \e[0m"
echo -e "\e[1;32m 32 -- green text \e[0m"
echo -e "\e[1;33m 33 -- yellow text \e[0m"
echo -e "\e[1;34m 34 -- blue text \e[0m"
echo -e "\e[1;35m 35 -- magenta text \e[0m"
echo -e "\e[1;36m 36 -- syan text \e[0m"
echo -e "\e[1;37m 37 -- white red text \e[0m"

line

echo -e "\e[1;0m reset background \e[0m"
echo -e "\e[1;40m 40 -- black background \e[0m"
echo -e "\e[1;41m 41 -- red background \e[0m"
echo -e "\e[1;42m 42 -- green background \e[0m"
echo -e "\e[1;43m 43 -- yellow background \e[0m"
echo -e "\e[1;44m 44 -- blue background \e[0m"
echo -e "\e[1;45m 45 -- magenta background \e[0m"
echo -e "\e[1;46m 46 -- syan background \e[0m"
echo -e "\e[1;47m 47 -- white background \e[0m"

line

echo -e "\e[1;43m  \e[1;31m yellow background and red text \e[0m   \e[0m"
echo -e "\e[1;47m  \e[1;31m white background and red text \e[0m   \e[0m"
echo -e "\e[1;41m  \e[1;33m red background and yellow text \e[0m   \e[0m"

line

